import { ref, computed } from "vue";
import { defineStore } from "pinia";
import { useRouter } from "vue-router";
import { getFunctionById } from "../services/function";

export const useFunctionStore = defineStore("function", () => {
    const func = ref({});
    const updateVisible = ref(false);
    async function fetchFunction(id){
        let res = await getFunctionById(id);
        func.value = res.data;
    }
    return { updateVisible,func,fetchFunction };
});
